package cn.yoyo.entity;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

// 博客类型
@Document("t_blogtype")
public class BlogType {
    @Id
    private String id;
    private String name;
    private Integer sum = 0;// 该类型博客的数量

    public BlogType() {
    }

    public BlogType(String id, String name, Integer sum) {
        this.id = id;
        this.name = name;
        this.sum = sum;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getSum() {
        return sum;
    }

    public void setSum(Integer sum) {
        this.sum = sum;
    }

    @Override
    public String toString() {
        return "BlogType{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", sum=" + sum +
                '}';
    }
}
